package dao;

import entity.Dept;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface DeptDao {
    @Insert("insert into dept(deptname) values('ano')")
    void insert();
    @Update("update dept set deptname='aaaa' where id = 1008")
    void update();

    @Delete("delete from  dept where id = 1008")
    void delete();

    @Select("select id,deptname from dept where id = 1008")
    Dept select();

    @Select("select id,deptname from dept ")
    List<Dept> selectAll();
}
